added sort parameter for adding values to allow individual values to be added