don't forget to update line_number when we insert or append for the first time