removed unneeded variables and functions