in reply to removing duplicate lines
The code, as you've posted it, doesn't even compile. You've got three '{' braces, and only two '}' braces. Please post the actual code.
Dave