added codeeval exercise 7