moved callback to first parameter