refactor, breaking out the webresource