you only use `to_bool` here once. is there any way we can avoid the dependency?