added find max method