record edits, more functions to prevent repeated code