added clean function