add a clear function

thanks nate