Well, how about putting whatever you want your program to do upon each response in seperate functions, and then just call the functions in that switch statement?