print index while parsing