update comments and document