added template, adding functionality