cleaner and simpler. Removes unneeded variables.