get template after checking the function parameters