add human tracking & fix some bugs for memory