streamsample updated with PEP8 changes