changed and added global vars so they aren't considered constants.