more stuffs
fixed some issues with the sorting