consolidating editing functions