Fixed math issue with the reorder method, forgot to subtract the number
Cleared encode method already