added code to track which curve is chosen for each activity. Not tested.