fixed some calculations and improved list output