Works but need to connect up to templates