a sample codeeval solution