remove log and add total period
making showTotal optional