make loader python 3 compatible