my code written for codeeval