adding code  to set up error pages