get random number on some interval