amend findMany so that query is optional