v0.2.1 big rewrite