removed debugs and made the CFs zero-indexed.