made polling functions into modules