added tpage variable