changes analysehitbuffer function