explicitly sort entries in order; this was only working haphazardly before