Working version with delete button