better way of getting current page url