refactor a little bit, bump to 0.3.0