merged from search branch