add cleanup of spaces