added rendering code and explanations