added define for random vs rand