add support for flat pages