added ability to load from file (version 9 - pre-refactoring exercises