removes superfluous variables.