modularized the project a bit