more work
port to tquery r56.0 + some patch for mobile