added random gen