revert back to first randgen code