odds are by me in python, evens by iruel in C++