method to figure out max id
slight rearrange
poll function to get new results