switch demo to use classes #9