sorting + tweaks