added some query associations, not sure if they're needed..