misplaced variable initialization