some improvements to paintertool