ADDED. Functionality for edit in the same windows