backward compatibility for sample.py added