refacto but aggregate return problems and some tests with find() function