add data structure to track the status of each node add logic to let master node assign role to loader and applier make sure the command request and reply is correct