changed the service structure, added a factory class and introduced a adapter