This entire function is not being tested according to the test coverage report.