remove console logs add checks for callback functions