generalized command structure