fix for GoogleCodeJam2014