expanded example code in README.md to a full program