defination needs to be in a closure