syntax fix
addded some code to polling api