Added Test.R and Modifed Functions.R