Ah. Here there is a golden rule that a boolean flag should be false first and later set to true. A whise hacker taught me. So you can use close_list as flag?