Adding test.R file testing the solution