adding random mode