Added the webPattern function to code