construct master and worker model for artecture