updated function editing