Composing 2 functions into a composite function