refactory line type factory