adding line function