implemented clear()