changed random tick generator