work on Codility questions