modified:   exam1code/factory.js