created editing function