added AQL FLATTEN function