refactoring. applicative style.