add random and chance functions