renamed some variables