minor change

renamed a function and deleted a unused variable