implemented importData function.