adding function calls. apeing code in the example