removed unnecessary function variables