adds measure via rpc
handles commands in worker