simplify query for scalability
simplify queries for principal messages