improvement of renderer and added some documentation for it