write max methods to pass tests