Making edit button work