basic modularization done