Add max command

Your code was awesome, I added a small function.