refactored fragment writers