adding validation and template changes.