documentation and style updated