adding transactional clear()