minor reshuffling, corrected template syntax again