change first arg of callback to shared_ptr