export apply_task method