refactor
add Writer