add edit functional