creating logic so that places page can save data during edits