changed rand endpoints