refactoring the not found action