refactored frame and stream objects