replaced speed mode magic numbers with static fields