finally fixed trial issue on rand