implement replace line