first draft - rewriting the tool to bin data in realtime