better template handling for adding supages