Sortiecat practicaly rewrote it and I fixed it