adding support for error pages