added support for edit feature