finalize parameters (should speed some things)