finish the call back function