first stab at modularization