added cleaning hostname
corrected clean function
Switched to format