Edit and delete button functioning