Re-added random id generator