fix samples to work with python3