move callbacks to the config struct