-common procedures for stream operations