updated edit button code