changed html text and added an exception handler