Please read the posting guidelines.
In particular you should have used code tags - this preserves formatting which makes code a lot easier to read.