refactor to Kleisli