Edited code indentation for readability