refactor to move service methods
added service layer