added debug code for testing time gap history