added video rendering code