modified RandomForest so that it runs now with script and compiles