source code created for ng-book (i cloned off someone else)