added template stuffs, things are broken now