upadted templates to use a better structure