added subsample.py