class demo code