replace code with material