indentation.

also, the code is hard to follow.  use an if / else block with comments?