8/7/14 - revised code, update perceivedBrightness formula