code review and rewrite
change to version 0.3.0
fixed: inline documentation