In future, make sure you use highlight tags when posting code.

We need more information. What are your issues? What works and what doesn't?