added the clear functionality. One more to go