updated return values of test function in R