eliminate duplicate code
fixed cs
removed duplicate codeblock
added lf