improve threshold lines on codes