template changes and errors states