Posted the properly indented code.

@ beanbean :
Plz do keep it in mind, when you post code here. I won't do it next time.