converting float to int because Vim can't use mod with floats