corrected random box size generation