fixed programmatical semantics as well as spelling errors