understanding array_rand
understanding array_reduce