renamed diff function to getdiff to follow code conventions