added template manipulation (untested)

Signed-off-by: Sweil <mail@sweil.de>