split off url creation into seperate method