implementing clear