use same callback signature

this is the code for #38