Modded code to look at 40/50 random trials