Function template and class finished