Fixing CodeEval challenge 2