modified painting helper