optimize commands sync