debugging + cutting out middle mand
silly bug where colorMax is initailized to 0 which prompts an error later
Make function from 5.0 compatible with SD