implements task processing