getChange function and tests added