added switch statement for multiple commands