added template and overlaoding