edit load function