add sorts to ensure the proper records are returned