Added code to forked function templates