finally fixed codeeval 88