refactor and bump to v0.3.0