not optimal STRING fix (see comment)
reorganized expression rules
function_with_query.sql passes now