removed an unnecessary line
added subq func and removed the riskful subquery detecting feature