added option for template choosing