added logic for 404 pages