Added if statement for most query types