* rewrite clean function.