uncommenting memset(history, 0, sizeof(history)); in search