refactored code indentation