added clear functionality