template functions checked and splited