solved (design) the replacement issue in fold