add templates class and templates functions