modified/added some test code. Test coverage: 85.3% of statements