add remove "hql as" logic