change callback to polling