use array to store the streams & cleanup