generic command flow