add patterns
add format function
fix perfomance
remove unneccesary code
dont clean
fix style
release build
update to 0.4.0