Wrote the clear() method