total function is up and working.