try to use another replace algorithm instead of second-chance