added template and stuff