Created a Set function to set the global variables