Replace lines