created sum and scale methods and added commenting in the program