complete the testing and add new terminate interface to polling system