throw errors in coroutines
remove task metatable
refactor task using pairs