Refactored 24 to run faster.