working version of class demo