clean coode based on comments