working on script to replace lines