replace group_num with NP to comply with problem