Created Save and Open function