refactored, now need to assess performance
parameter setting changed