improved clean up