added random calculation for height