Added materialize function