got palette switching to work!