rewritting the stats view to handle the new storage structure