added test data file and fixed bugs