add rich code