template stuff that still needs to be fixed