added print cat total function. needs testing