debugged calc_halflife strtoupper