added max method