created all the templates and corrected everything as per Matt