refactor.. introducing service layer