added polling and relevant test