adding a clear() method