reverted to if else for useragent matching, since switch case syntax is limited to full string matching