resolve tests, add bin/tprint.py