implement refinement, random numbers, shader while