added 404 capturing