update function test and fix poll()