switched to throws in unit tests