added extendTo template