added examples of rotation and improved the render draw function