adding debugging to index