adding clear functionality