refactored urlbuilder