removed some test and log code from tag-sorted