To add the cases for query and reply