Compiling code....Please note that I have commented out the updatevalues() function for ease