allow srandmembers to take an optional parameter for the number of elements