simple counter was used instead of xrange