added support for editing