added random functions