made main template for creating fn