added tests have to now merge with search