added a clear completed function