add mode, settings in hooks