Adding interrupt code