changed type to Double for firstpaint
added msFirstPaint