change base_url into root_url
refactor