implemented cleanwhitespace