defined renderer class and wrote a sample demo