remove unnecessary function variables