maybe better define variable _before_ using it

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>