added line switching