added test with flat file