marker_reference python 3 compatible
No need to use xrange for a short loop

fixes python3