implemented a clear function