why moving the variable after the checks ?