refactor to eliminate duplicate variable use and to variable descriptive names