udpated loader.py