implementing chart and screwed up polling