removed total function