make display line function shorter