modernized sequence replace