created subpage logic. added extensions.