adding load file functionality