refactored C4 module