added interrupt functionality