added homedocument
added unit test
fix unit test