better comparison testing in sample.py