execute command for each node