migrated DB queries to D7 entity queries