- extracted logic to commands