added flex output