factoring variables into a common place