Few style things here. Always use {} around these, even for a one line case after it. Also please use 2 spaces indenting like the rest of the code here.