max method for array handler