examples: add main function
add rudimentary master/controller/client