made individual functions for searching min/max/average values