add switch statement for query param validation