added test data, refactoring