improve stream and demo-router