fixed tests and added test for data service