preload and sort messages