refactor paint