implemented call back function wrapper