more closure and nested funciton call