Move random setting to the right method