Updated Edit Button Functionality