added 404 error handling