transform async code to sync code using fibers