d_element_t moved to while()