working version of distributed swan