adding functions

saving about 100 lines of code by adding general singleChange and
forChangeLoop functions