change function name & remove extraneous code