solved Applicative excercise