simple unparser:  start testing, and improve implementation (reduce state modifications)