add doc and fixes