re-org and simplify the basic example