implement edit functionality (without saving to localStorage)