renamed some  variables