minor changes and changes to query.find method