1. Its spelt tuning, not tunning

2. Format your code and plan - its really hard to read like that

wrap it in [ code ] and [ / code ]