load function

moved load out of constrcutor