Speeded up certain calculations 5X