refactored the code, changed the webview fragment