removed different type logic in get_element