get rid of out of order variable declaration