refactor using new API and URL service