started adding minlength, possibly broken paintNodes