added Debug class and removed index