corrected issue #5

Variables must be declared at the beginning of of block.

Sorry...