slight changes to test.R