bug fixed and documentation.