added add line function