added a function in Poll class