Added line shifting function. *Not tested