need to test mask/toggle
modified enable_interrupts and added toggle/mask
final changes to 4.0.0