add prototype that uses polling