move handler to tasks, circular imports