Add function to duplicate lines