cleaned up code for basic interrupt program