add proper widget sorting