Add switch case to handle formuation of response