changes for edit popup and small code ref