store callbacks by value