indentation looks really off here... are you mixing hard tabs and spaces?