change paint func