finished functions and formatting for zstats