rules for streams