make -writeBody method public