added random trial stuff