fixes #4 and shows appropriate totals