added psuedorandom gen