complete the callbacks function