cleaned up and documented likely_element and likely_set_element