implement clear()