reimplemented mask drawing tools