base render code