added domain and service logic, tests