made data storage entity dependent, updated unit tests.