refactored bnwp_get_terms()