painting template fixed with extra parameter