setting total on end_all