r script modified  and test data file added