implementing back end search and relative tests