better coding style

move variable definition before it's first use. This worked, since both
definitions are in the same scope, but it's more readable, this way.