merged stream and main modules