Eli implemented the max-element function