update for new URL changes, replace redundant code based on gil's feedback