cleaned up code and wrote minor additional utility for list displays