changed QueryHandler with a RResult handler callback and added
parameterizing the R script(test.java)