check for next function return 404 if none