The basic random routine