factory for line handlers