init rendering code