Added polling, polling functions are triggered twice at the moment