this is actually HQL. (-: fine as a rebase though