added loadfile classmethods/Started working on encoding