update documentation
improve code standard
add some tests