remove tree refinement from the copypasted code