added updating of devices in timer interrupt handler