Implementing the service layer