added total to constructor and HTML template