Changed render code