function template has already been definedPlease use code formatting and edit the main post instead of appending it.