Add a real random function in.
fix conflicts