adding rendering code