renamed some params and variables, scope set as public