finished rainbow test code