writeVisibility template updated