add group api and  finish testing