adding "smart stream" support