started writing the unfolding matrix