logic for generic error page done