replace select with poll