allow callback as second parameter