Post your code in code or highlight tags. You can read how in the Announcements at the top of the page.

"it is not doing what it needs to do", and "it is all messed up" are not helpful. Please...