optimizing - memory uin && lastGroup