added floor division to function that is python 2.x and 3.x compatible