Submitted code to CodeEval.com