add sketch. interrupt vars should be volatile