added clear functinon