added interrupts; fixes #8; fixes #9