documentation update and fix bugs