function for interrupt check #18