changed to a more modular layout
further modularization