changed monads to use deep application