total displays correctly with ajax