added values() and tuples() functions, refactored search()