changed eq and cat max methods to work over an array