debug for index