fixed color-rotating bug by hard-coding colors
added docstrings, removed global variables