added function for local load.