https://tutorial.eyehunts.com/python/python-modulo-negative-numbers/
Python modulo negative numbers