added basic error handling and page title