seems to work - but need to replace taskDelay