changed code.R (testing)