modified use of param1 to not use global_param1 so that value is used properly in calculations