testing formatDoc method