added intpin flag to interrupt