created paint function