added random distribution capability