Part of video render code added