switch command based on destination