how to handle different type of data file in single type