hooking up error pages with message