simple use of ruby method, array, rand, selecting an index and if elsif