pass callbacks by rvalue reference