improved build stats calculation and displaying code