test coverage to 71%
remove bad if statement. if a function is not provided, the code
would hang. with this change, an error will be thrown