add argument to iocallback functions. use that for serial to speedup.