stylistic changes added to make the code more readable