Changed getAll to query