TODO: implement FunctionGenerator
beatify queries with lines