had to change scanLine and comparison functions to deal with new enum types ARRGH THAT WAS SUPPOSED TO BE EASY