finished Applicative refactoring