renamed some variables.