fixed codeeval 143