complete rewrite 0.3.0