moved the selectTemplate function to render and added docs
updated docs