get_total logic finished