refactoring the normalize formatting (so it's cleaner and *works*)