begin rendering code