added some notes and remove extra white spaces and line breaks