templates are now in correct order