Changed load function to local method