added function add_to_scope