<algorithm> could easily be removed as well; I forgot when I got rid of max to track which of them was the larger