This is a simple path router for use in client side