figured out why the "add" template func was broken