renamed some variables for consistency