interrupt and decode functions