debug of the sort map functionality