used location.url instead of path