added support for edit entity.