redid sorting, added export