root function is catching all requests
client-side script