Functional Sorting 2
Fixing the database