simplify applicative logic