added save method so it will work with Mobile Safari