a few optimization
add debug mode
add tests and examples
0.0.5