implement materialize