added client id and start/stop detection