move url out as it is needed in main call