refactor parseUrl with, use strict mode