added readability/maintainability changes