You really need to fix your indentation

Most modern IDE's have an auto format option.

Indent style - Wikipedia, the free encyclopedia

I prefer Allman, but they are all as good as each other.