added a test. Test coverage: 78.5% of statements