added main function for doing RBF calculations