fixed random stone function