Added interrupt handling