py3 compatibility: range -> list(range)