refactored so project is more organized