buildHistory endpoint
fixed some bugs, added clientGroupController test