refactored the code styling logic to be VERY straightforward