separated to layers, added services