rewriting the service layer