everything seems to be alright. branching to write switch polling
restoring interrupt based switches leads to some bug