Functions to sort blobs