I haven't even run it, but you surely meant add_element here, not all_element.