Added function to add trial data