corrected modularization to fit recommended approach.