edit functinlity