add is_element_present def