implemented cluster mode