Added function for accounting.