handles every level of value search