some basic variable reorganiztion