debug old code