Query representation almost done