How to write a new distributed object