implemented clear-functionality