improve linereducer