Prefix scan working