Changed the call back function