add protection for add_chain