added 404 logic and hopefully some caching