edited test main
added output operator to CFG