change error processing (in progress)
made Connection and Stream class (for future implementation)