renaming some variables
fixing indentation