add functioning random class