fix the bug about current URL and finish basic function