refactor painting_form