add polygon construction and line mode