adding rainbow-mode hooks