choose template functionality