make callback function wrapping code compile