Start on ratedsearch function
Add test for it