Create search class. Use arr.find and or instead of conditionals