a simple demo finished in class