move tasks into lib