changed the way we render templates & layotus