message and query work