implement edit on dynamically generated notes, also fix edit not working on already edited notes