pickle load function adjusted