pass in wrap callback function