more work on adding tests.
updated factorial example to be more interesting!