Yes, almost correct, there're still some corner cases like I described below.