changed to usleep in history.cpp