minor refactoring
add url reading