sorting pending notifications