evaluating composition of functions