optimize times_worn code