Solve rand problems add ran.h